
import { createBrowserRouter, Navigate } from 'react-router-dom'


//zt
// import ZTlogin from '../component/ZT/ZTlogin'
// import Wang from '../component/ZT/wang'
//wj
import Frame from '../component/WJ/Frame'
import Home from '../component/WJ/home'

//swq


//zlq
import Prescription from '../component/ZLQ/prescription';
import Management from '../component/ZLQ/management.js';
import A from '../component/ZLQ/a';
import Diagnostic from '../component/ZLQ/diagnostic.tsx'
import Dictionary from '../component/ZLQ/dictionary.tsx'
import Log_on from '../component/ZLQ/log_on.tsx'
import Operation_log from '../component/ZLQ/operation_log.tsx'
import Parameter from '../component/ZLQ/parameter.tsx'

//cws
import Patient from '../component/CWS/Patient'
import Disease from '../component/CWS/Disease'
import Doctor from '../component/CWS/Doctor'
import Print from '../component/CWS/Print'
import Doctor_xiang from '../component/CWS/Doctor_xiang'
import OPDS from '../component/CWS/OPDS'

//why
import Demo from '../component/WHY/demo.tsx'
import Book from '../component/WHY/wycomponents/Book.tsx'
import Main from '../component/WHY/Main.tsx'
import Studio from '../component/WHY/Studio.tsx'

import Mere from '../component/WHY/wycomponentchild/MedicalRecord.tsx'
import Doss from '../component/WHY/wycomponentchild/DoctorIssue.tsx'
import Gohs from '../component/WHY/wycomponentchild/Gohospital.tsx'
import Oe from '../component/WHY/wycomponentchild/Online.tsx'
import Op from '../component/WHY/wycomponentchild/Operation.tsx'
import Nt from '../component/WHY/wycomponentchild/Notice.tsx'
import Awg from '../component/WHY/wycomponentpage/addwestDrug.tsx'
import Aip from '../component/WHY/wycomponentpage/addinspect.tsx'
import At from '../component/WHY/wycomponentpage/addtest.tsx'
import Wl from '../component/WHY/wycomponentpage/westDrugList.tsx'
import Cl from '../component/WHY/wycomponentpage/chiaDrugList.tsx'
import Dl from '../component/WHY/wycomponentpage/diagnosis.tsx'
import Hi from '../component/WHY/wycomponentpage/History.tsx'




let router = createBrowserRouter(
    [
        //ZT
        // {
        //     path:'/',
        //     element:<ZTlogin/>
        // },
        // {

        //     path:'/ztlogin',
        //     element:<ZTlogin/>
        // },
        // {
        //     path:'/wang',
        //     element:<Wang/>
        // },


        //WJ
        {
            path: "/",
            element: <Navigate to="/frame/home"></Navigate>,
        },
        {
            path: "/frame",
            element: <Frame></Frame>,
            children: [
                {
                    path: '/frame/home',//首页
                    element: <Home></Home>,
                },
                {
                    path: "ptient",//
                    element: <Patient></Patient>
                },

                {
                    path: "doctor",
                    element: <Doctor></Doctor>
                },
                {
                    path: "opd",
                    element: <OPDS></OPDS>
                },
                {
                    path: 'main',
                    element: <Main></Main>
                },
                {
                    path: 'studio',
                    element: <Studio></Studio>,
                    children: [
                        {
                            path: 'mere',
                            element: <Mere></Mere>
                        },
                        {
                            path: 'doss',
                            element: <Doss></Doss>
                        },
                        {
                            path: 'gohs',
                            element: <Gohs></Gohs>
                        },
                        {
                            path: 'oe',
                            element: <Oe></Oe>
                        },
                        {
                            path: 'op',
                            element: <Op></Op>
                        },
                        {
                            path: 'nt',
                            element: <Nt></Nt>
                        },
                        {
                            path: 'awg',
                            element: <Awg></Awg>
                        },
                        {
                            path: 'wl',
                            element: <Wl></Wl>
                        },
                        {
                            path: 'cl',
                            element: <Cl></Cl>
                        },
                        {
                            path: 'dl',
                            element: <Dl></Dl>
                        },
                        {
                            path: 'aip',
                            element: <Aip></Aip>
                        },
                        {
                            path: 'at',
                            element: <At></At>
                        },
                        {
                            path: 'hi',
                            element: <Hi></Hi>
                        },
                    ]
                },
                {
                    //词条管理
                    path: "management", element: <Management />,
                },
                {
                    //常用诊断管理
                    path: "diagnostic", element: <Diagnostic />,
                },
                {
                    //字典管理
                    path: "Dictionary", element: <Dictionary />,
                },
                {
                    //登录日志
                    path: "log_on", element: <Log_on />,
                },
                {
                    //操作日志
                    path: "operation_log", element: <Operation_log />,
                },
                {
                    //参数配置
                    path: "parameter", element: <Parameter />,
                },




            ]
        },
        //SWQ



        //ZLQ
        //
        {
            path: "/prescription", element: <Prescription />,
        },
        {
            path: "/a", element: <A />,
        },
        //CWS
        {
            path: "print",
            element: <Print ></Print>
        },
        {
            path: "prints/:id",
            element: <Doctor_xiang ></Doctor_xiang>
        },
        {
            path: "disease/:id",
            element: <Disease ></Disease>
        },

        //WHY
        {
            path: '/book',
            element: <Book></Book>
        },
        {
            path: '/demo',
            element: <Demo></Demo>
        }


    ]
)

export default router